package debugs;

import javax.servlet.http.HttpServletResponse;

import models.AutoSite;

public class AutoSiteDebug {
	public static void debug(AutoSite autoSite) {
		System.out.println("site Id: " + autoSite.getId());
		System.out.println("site: " + autoSite.getSite());
		System.out.println("blogId: " + autoSite.getBlogId());
		System.out.println("regLink: " + autoSite.getRegLink());
		System.out.println("regTitle: " + autoSite.getRegTitle());
		System.out.println("regDescription: " + autoSite.getRegDescription());
		System.out.println("regRemove: " + autoSite.getRegRemove());
		System.out.println("currentPage: " + Integer.toString(autoSite.getCurrentPage()));
		System.out.println("totalPage: " + Integer.toString(autoSite.getTotalPage()));
		System.out.println("sitePage: " + autoSite.getSitePage());
		System.out.println("typeSource: " + autoSite.getTypeSource());
		System.out.println("displaySource: " + autoSite.getDisplaySource());
		System.out.println("category: " + autoSite.getCategory());
	}
	
	public static void debugWeb(AutoSite autoSite, HttpServletResponse response) {
		try {
			response.getWriter().println("site Id: " + autoSite.getId());
			response.getWriter().println("site: " + autoSite.getSite());
			response.getWriter().println("blogId: " + autoSite.getBlogId());
			response.getWriter().println("regLink: " + autoSite.getRegLink());
			response.getWriter().println("regTitle: " + autoSite.getRegTitle());
			response.getWriter().println("regDescription: " + autoSite.getRegDescription());
			response.getWriter().println("regRemove: " + autoSite.getRegRemove());
			response.getWriter().println("currentPage: " + Integer.toString(autoSite.getCurrentPage()));
			response.getWriter().println("totalPage: " + Integer.toString(autoSite.getTotalPage()));
			response.getWriter().println("sitePage: " + autoSite.getSitePage());
			response.getWriter().println("typeSource: " + autoSite.getTypeSource());
			response.getWriter().println("displaySource: " + autoSite.getDisplaySource());
			response.getWriter().println("category: " + autoSite.getCategory());
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
}
